import React from "react";

class ListDemo extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      list: [
        {
          id: 'id-1',
          title: '本田'
        },
        {
          id: 'id-2',
          title: '丰田'
        },
        {
          id: 'id-3',
          title: '福特'
        }
      ]
    }
  }

  render() {
    return (
      <ul>
        {
          this.state.list.map(item => {
            return (
              <li key={item.id}>{item.title}</li>
            )
          })
        }
      </ul>
    )
  }
}

export default ListDemo